<?php 
    include "ProductDetails.php";
    include "ProductDetailsDao.php";
    include "Datasource.php";

    $tempProduct = new ProductDetails();
    $productDao = new ProductDetailsDao();
    $conn = new Datasource("localhost","theanykey","root","");
    $id = $_GET['id'];
    $obj = $productDao->getObject($conn, $id);
                      $id = $obj->getProductID();
                      $manufact = $obj->getManufacturer();
                      $model = $obj->getModelNo();
                      $serial = $obj->getSerialNo();
                      $ourPrice = $obj->getCompanyPrice();
                      $theirPrice = $obj->getCustomerPrice();
                      $techNotes = $obj->getTechNotes();
                 
?>


<script type="text/javascript">

            w = window.opener;
            w.document.getElementById("pid").value = "<?php echo $id; ?>";
            w.document.getElementById("hdnID").value = "<?php echo $id; ?>";
            w.document.getElementById("Manufac").value = "<?php echo $manufact; ?>";
            w.document.getElementById("ModelNum").value = "<?php echo $model; ?>";
            w.document.getElementById("SerialNum").value = "<?php echo $serial;?>";
            w.document.getElementById("CompPrice").value = "<?php echo $ourPrice; ?>";
            w.document.getElementById("CustPrice").value = "<?php echo $theirPrice; ?>";
            w.document.getElementById("TechN").value = "<?php echo $techNotes; ?>";
            window.close();



    </script>